﻿<UserControl 
    x:Class="OcrSampleApp.Controls.PhotoArea"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480">

    <Grid x:Name="LayoutRoot" Background="{StaticResource PhoneChromeBrush}">

        <Image 
            x:Name="currentPhoto" 
            IsHitTestVisible="False"
            Source="{Binding PhotoSource}" 
            RenderTransformOrigin="0.5,0.5" RenderTransform="{Binding PhotoAngle, Converter={StaticResource AngleToRenderTransform}}" />

        <Border 
            x:Name="txtConvertingMessageWrapper" 
            HorizontalAlignment="Center"
            VerticalAlignment="Bottom"
            Visibility="{Binding OcrConversionStateManager.OcrConversionState, Converter={StaticResource StringMatchToVisibleConverter}, ConverterParameter=Converting}"
            Background="{StaticResource PhoneChromeBrush}" Opacity="0.7" >
            <TextBlock 
                x:Name="txtConvertingMessage" 
                Text="Converting... Please Wait" 
                Margin="10,5,10,5" />
        </Border>


    </Grid>
</UserControl>
